// 延期柱状图
export function postponenum(data) {
    return {
        title: {
            text: '工厂合格率统计图',
            subtext: '仓检日期作为坐标轴'
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['合格数']
        },
        toolbox: {
            show: true,
            feature: {
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                data: data.week
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '合格数',
                type: 'bar',
                data: data.rate,
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                markLine: {
                    data: [
                        {type: 'average', name: '平均值'}
                    ]
                }
            }
        ]
    }

}
export function postponenumno(data) {
    return {
        title: {
            text: 'QC质检数据不合格统计图/一周内',
            subtext: '当日时间为坐标轴'
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: [ '不合格数']
        },
        toolbox: {
            show: true,
            feature: {
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                data: data.week
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '不合格数',
                type: 'bar',
                data: data.weeknopass,
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                markLine: {
                    data: [
                        {type: 'average', name: '平均值'}
                    ]
                }
            }
        ]
    }

}
export function postponenumline(data) {
    return {
        title: {
            text: 'QC质检合格率/一周内',
            subtext: '当日时间为坐标轴'
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: [ '合格率']
        },
        toolbox: {
            show: true,
            feature: {
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                data: data.week
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '合格率',
                type: 'line',
                data: data.weekpassrate,
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                markLine: {
                    data: [
                        {type: 'average', name: '平均值'}
                    ]
                }
            }
        ]
    }

}




